import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Edge()
driver.get('https://www.jd.com/')
time.sleep(2)
# 请登录
driver.find_element(By.CLASS_NAME,'link-login').click()
time.sleep(2)
# 点击QQ登录
driver.find_element(By.CLASS_NAME,'QQ-icon').click()
time.sleep(2)
# 进入frame框架
driver.switch_to.frame(driver.find_element(By.ID,'ptlogin_iframe'))
time.sleep(2)
# 密码登录
driver.find_element(By.ID,'switcher_plogin').click()
time.sleep(5)
# 输入账号
driver.find_element(By.CLASS_NAME,'inputstyle').send_keys('1441688225@qq.com')
time.sleep(2)
# 输入密码
driver.find_element(By.XPATH,'//*[@id="p"]').send_keys('xbw20120329XR')
time.sleep(2)

driver.find_element(By.ID,'login_button').click()
time.sleep(60)
